home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / TEXTEDIT.SWG / 0001_CENTER1.PAS.pas next >
Pascal/Delphi Source File  |  1993-05-28  |  496b  |  26 lines

  1. {
  2. >Anyways, does anyone here have a quick and easy Procedure or
  3. >Function For centering Text?
  4. }
  5.  
  6. Program CenterIt_Demo;
  7.  
  8. Uses
  9.   Crt;
  10.  
  11. { Display a String centered on the screen. }
  12. Procedure DisplayCenter(st_Temp : String; by_Yaxis : Byte);
  13. begin
  14.   GotoXY(((Succ(Lo(WindMax)) - Length(st_Temp)) div 2), by_Yaxis);
  15.   Writeln(st_Temp);
  16. end; {DisplayCenter. }
  17.  
  18. Var
  19.   by_OldAttr : Byte;
  20.  
  21. begin
  22.   ClrScr;
  23.   DisplayCenter('The Spirit of Elvis says... Hi!', 10);
  24.   ReadKey;
  25. end.
  26.